from sqlalchemy import Column, String

from database import db


class Language(db.Model):
    id = Column(String(30), primary_key=True)
    screen_name = Column(String(80))
    logo = Column(String(200))
    type = Column(String(10), default='normal')
    status = Column(String(20), default='enabled')

    STATUS_ENABLED = 'enabled'

    STATUS_REMOVED = 'removed'
    TYPE_NORMAL = 'normal'

    TYPE_DEFAULT = 'default'

    def is_default(self):
        return self.type == self.TYPE_DEFAULT
